home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / FW_CCommand DoIt < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.0 KB  |  [TEXT/ttxt]

  1. Subject:     FW_CCommand::DoIt
  2. Sent:        6/2/96 1:45 AM
  3. Received:    6/3/96 7:58 AM
  4. From:        Hutchings Software Development, hsd@earthlink.net
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. I noticed that FW_CCommand::DoIt is pure virtual. This caused a subtle
  9. bug for me this evening because I didn't initially realize that my
  10. override had
  11. to call "SaveUndoState" to make it get called!
  12.  
  13. So, I eventually lifted the following out of
  14. FW_CClipboardCommand::DoIt.
  15.  
  16.     if (GetCanUndo(ev))
  17.         this->SaveUndoState(ev);    // save current state, for later Undo
  18.  
  19. Would it be possible (for future release) to either move this to
  20. FW_CCommand::Execute, or put it in FW_CCommand:DoIt? It took me a good
  21. 15 minutes with MW Debug to figure out that I was missing those from
  22. my DoIt override. If the undo/redo methods are defined in FW_CCommand,
  23. why not wire them up too?
  24.  
  25.  
  26.  
  27. Brad
  28.  
  29.  
  30.  
  31.  
  32. Richard B. "Brad" Hutchings
  33. General Partner,
  34. Hutchings Software Development
  35.  
  36. hsd@earthlink.net
  37.  
  38.  
  39.